package com.yuantutech.pay.consumer;

import java.util.List;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.yuantutech.pay.model.Patient;
import com.yuantutech.pay.service.HospitalService;

public class DubboConsumer {
	public static void main(String[] args) {

		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
				"applicationContext*.xml");
		context.start();
		HospitalService hospitalService = (HospitalService) context
				.getBean("hospitalService");

		List<Patient> list = hospitalService.getPatientListByHospitalId("1");
		System.out.println("ID ==> " + list.get(0).getPatientId());
		System.out.println("姓名 ==> " + list.get(0).getPatientName());
		context.destroy();
	}
}
